<?php
$Set_Title		= $news_type_nc->Category_List;
$RowAll			= $news_type_class->GetByAll();
?>
<div class="dataTables">
	<div class="dataTables_bar fl">
    	<h5 class="title dib"><?php echo $Set_Title;?></h5>
        <div class="dropdown fr">
            <a class="dropdown-toggle db" data-toggle="dropdown" href="#"><i class="icon_cog dib"></i><?php echo $config_nc->Menu;?><i class="caret dib"></i></a>
            <ul class="dropdown-menu">
                <li><a href="<?php echo $WEB_DOMAIN.'/'.$WEB_ADMIN.'/index.php?u1=one-news-category';?>"><?php echo $config_nc->Add;?></a></li>
            </ul><!--end dropdown-menu-->
        </div><!_-end dropdown-->
    </div><!--end dataTables_bar-->
    <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
        <thead>
            <tr>
                <th><?php echo $config_nc->STT;?></th>
                <th><?php echo $news_type_nc->Category_Name;?></th>
                <th><?php echo $news_type_nc->Category_Status;?></th> 
                <th><?php echo $news_type_nc->Category_Sort;?></th>
                <th> </th>
            </tr>
        </thead>
        <tbody>
        	<?php if(!is_array($RowAll)){?>
            <!--tr ><td colspan="5"><?php echo $config_nc->Not_result;?></td></tr-->
            <?php }else{ ?>
            <?php 		$count = count($RowAll); ?>
            <?php 		for($i=0;$i<$count;$i++){ ?>
			<tr class="gradeA">
                <td><?php echo $i+1;?></td>
                <td class="center"><?php echo $RowAll[$i]['name'];?> </td>
                <td class="center">
                	<?php 
						if($RowAll[$i]['status']==0){
							echo $config_nc->status_2;
						}else{
							echo $config_nc->status_1;
						}
					?>
                </td>                
                <td class="center"><?php echo $RowAll[$i]['sort'];?> </td> 
                <td class="center">
                	<a href="<?php echo $WEB_DOMAIN.'/'.$WEB_ADMIN.'/index.php?u1=one-news-category&u2='.$RowAll[$i]['id_type']; ?>"><?php echo $config_nc->View;?></a>
                    &nbsp;&nbsp;&nbsp;
                    <a href="javascript:;" onclick="Del('<?php echo $config_nc->Sure;?>','<?php echo $WEB_DOMAIN.'/'.$WEB_ADMIN.'/index.php?u1=_news-category&u2=del&u3='.$RowAll[$i]['id_type'];?>');"><?php echo $config_nc->Del;?></a>
                 </td>
            </tr>
            <?php 		} ?>
            <?php } ?>
        </tbody>
    </table>
</div><!--end dataTables-->